
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link href="assets/css/bootstrap.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="css/style.css"/>
    <link href="assets/css/codemirror.css" rel="stylesheet">
    <link rel="stylesheet" href="assets/css/ace.min.css" />
    <link rel="stylesheet" href="font/css/font-awesome.min.css" />
    <!--[if lte IE 8]>
    <link rel="stylesheet" href="assets/css/ace-ie.min.css" />
    <![endif]-->
    <script src="js/jquery-1.9.1.min.js"></script>
    <script src="assets/js/bootstrap.min.js"></script>
    <script src="assets/js/typeahead-bs2.min.js"></script>
    <script src="assets/js/jquery.dataTables.min.js"></script>
    <script src="assets/js/jquery.dataTables.bootstrap.js"></script>
    <script src="assets/layer/layer.js" type="text/javascript" ></script>
    <script src="assets/laydate/laydate.js" type="text/javascript"></script>
    <script src="js/displayPart.js" type="text/javascript"></script>
    <title>库存调整</title>
</head>

<body>
<div class="margin clearfix">
    <div class="Shops_Audit">
        <!--申请列表-->
        <div class="audit_list">
            <table class="table table-striped table-bordered table-hover" id="sample-table">
                <thead>
                <tr>
                    <th  width="50px">序号</th>
                    <th width="80px">仓库编号</th>
                    <th width="80px">产品编号</th>
                    <th width="100">产品名</th>
                    <th width="100">型号</th>
                    <th  width="80px">仓库数量/单位</th>
                    <th width="80px">实际数量/单位</th>
                    <th width="80px">调整数量/单位</th>
                    <th width="100">操作</th>
                    <th width="100">备注</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>1</td>
                    <td width="80px">宿迁仓</td>
                    <td>XDF15454525</td>
                    <td>旭派电池</td>
                    <td>64ma</td>
                    <td>3000/个</td>
                    <td>0/个</td>
                    <td class="sj_sl"><input onclick="change_jack(this)" type="text" placeholder="0/个"/></td>
                    <td><button class="btn btn-primary save_bc disabled">保存</button></td>
                    <td class="td-status">本次电池用于销往海南地区，........</td>
                </tr>
                <tr>
                    <td>2</td>
                    <td width="80px">宿迁仓</td>
                    <td>XDF15454525</td>
                    <td>旭派电池</td>
                    <td>64ma</td>
                    <td>3000/个</td>
                    <td>1000/个</td>
                    <td class="sj_sl"><input onclick="change_jack(this)" type="text" placeholder="1000/个"/></td>
                    <td><button class="btn btn-primary save_bc disabled">保存</button></td>
                    <td class="td-status">本次电池用于销往海南地区，........</td>
                </tr>
                <tr>
                    <td>3</td>
                    <td width="80px">宿迁仓</td>
                    <td>XDF15454525</td>
                    <td>旭派电池</td>
                    <td>64ma</td>
                    <td>3000/个</td>
                    <td>0/个</td>
                    <td class="sj_sl"><input onclick="change_jack(this)" type="text" placeholder="0/个"/></td>
                    <td><button class="btn btn-primary save_bc disabled">保存</button></td>
                    <td class="td-status">本次电池用于销往海南地区，........</td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="clearfix cl">
            <div class="Button_operation">
                <button onClick="article_save_submit();" class="btn btn-primary radius" type="submit"><i class="icon-save"></i>提交</button>
                <button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script>
    function change_jack(that){
        $(that).parent().next().children().removeClass("disabled");
    };
    $(".save_bc").on("click",function(){
        var int_val=$(this).parent().prev().children().val();
        $(this).removeClass("btn-primary").addClass("btn-success");
        if(!int_val.trim())return;
        $(this).parent().prev().children().val(int_val+'/个');
    });
    $(function () {
        $(".displayPart").displayPart();
    });
    $(function() {
        var oTable1 = $('#sample-table').dataTable( {
            //"aaSorting": [],//默认第几个排序
            "bStateSave": true,//状态保存
            //"dom": 't',
            "bFilter":false,
            "aoColumnDefs": [
                //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
                {"orderable":false,"aTargets":[0,1,2,3,4,5,6]}// 制定列不参与排序
            ] } );
        $('table th input:checkbox').on('click' , function(){
            var that = this;
            $(this).closest('table').find('tr > td:first-child input:checkbox')
                    .each(function(){
                        this.checked = that.checked;
                        $(this).closest('tr').toggleClass('selected');
                    });

        });
    })
    /*店铺-删除*/
    function member_del(obj,id){
        layer.confirm('确认要删除吗？',{icon:0,},function(index){
            $(obj).parents("tr").remove();
            layer.msg('已删除!',{icon:1,time:1000});
        });
    }
    //面包屑返回值
    var index = parent.layer.getFrameIndex(window.name);
    parent.layer.iframeAuto(index);
    $('.Refund_detailed').on('click', function(){
        var cname = $(this).attr("title");
        var chref = $(this).attr("href");
        var cnames = parent.$('.Current_page').html();
        var herf = parent.$("#iframe").attr("src");
        parent.$('#parentIframe').html(cname);
        parent.$('#iframe').attr("src",chref).ready();;
        parent.$('#parentIframe').css("display","inline-block");
        parent.$('.Current_page').attr({"name":herf,"href":"javascript:void(0)"}).css({"color":"#4c8fbd","cursor":"pointer"});
        //parent.$('.Current_page').html("<a href='javascript:void(0)' name="+herf+" class='iframeurl'>" + cnames + "</a>");
        parent.layer.close(index);

    });
    function article_save_submit(){
        window.location.href='inventory.html';
    }
    function layer_close(){
        window.location.href='inventory.html';
    }

</script>
